<!DOCTYPE html>
<html>

<head>
  <!-- 第一步 配置Html 移动端 -->
  <meta charset="utf-8">
  <meta name="viewport"
    content="width=device-width,initial-scale=1.0,minimum-scale =1.0,maximum-scale=1.0,user-scalable=no">
  <!-- 在 head 标签中添加 meta 标签，并设置 viewport-fit=cover 值 -->
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">

  <!-- 开启 safe-area-inset-bottom 属性 -->
  <van-number-keyboard safe-area-inset-bottom />
  <title>appschool</title>
  <script src="/static/js/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
  <div id="app"></div>
  <!-- built files will be auto injected -->
  <script>
    //   var fontSize = function() {
    //     document.documentElement.style.fontSize = (window.innerWidth / 10) + 'px';
    //   }
    //   fontSize();
    //   $(window).resize(function() {
    //   fontSize();
    // })
    //字体适配
    var head = document.querySelector('head')
    // 在iphone6中 1rem=20px 移动端浏览器字体最小12px
    var w = document.documentElement.clientWidth / 18.75
    // 创建style标签
    var styleNode = document.createElement('style')
    // 在style标签中写入内容
    styleNode.innerHTML = "html{font-size:" + w + "px !important}"
    // 将style节点插入到head中
    head.appendChild(styleNode)
    //宽度适配
    // 设置设计图的尺寸640 / 750 都行
    var targetW = 375
    // 设定缩放比例
    var scale = window.screen.width / targetW
    // 创建meta标签
    var meta = document.createElement('meta')
    // 为meta标签设定属性值
    meta.name = "viewport"
    meta.content = "initial-scale=" + scale + ", minimum-scale=" + scale + ", maximum-scale=" + scale + ",user-scalable=no"
    // 将meta标签插入到head标签中
    document.head.appendChild(meta)
    //高度适配
    var height = window.screen.height;
    var adjustRem = (height / 667 * 62.5).toFixed(2) + '%';
    $("html").css("font-size", adjustRem);
  </script>
</body>

</html>